<?php
/*	Create post type building	*/
add_action( 'init', 'codex_custom_init' );
function codex_custom_init() {
  $labels = array(
    'name'               => 'Buildings',
    'singular_name'      => 'Building',
    'add_new'            => 'Add New',
    'add_new_item'       => 'Add New Building',
    'edit_item'          => 'Edit Building',
    'new_item'           => 'New Building',
    'all_items'          => 'All Buildings',
    'view_item'          => 'View Building',
    'search_items'       => 'Search Buildings',
    'not_found'          => 'No buildings found',
    'not_found_in_trash' => 'No buildings found in Trash',
    'parent_item_colon'  => '',
    'menu_name'          => 'Buildings'
  );

  $args = array(
    'labels'             => $labels,
    'public'             => true,
    'publicly_queryable' => true,
    'show_ui'            => true,
    'show_in_menu'       => true,
    'query_var'          => true,
    'rewrite'            => array( 'slug' => 'building' ),
    'capability_type'    => 'post',
    'has_archive'        => true,
    'hierarchical'       => false,
    'menu_position'      => null,
    'supports'			 => array('title','editor','author','thumbnail','custom-fields','revisions','page-attributes','post-formats','comments'),
	'taxonomies'		 => array('post_tag')		
  );

  register_post_type( 'building', $args );
}
add_action( 'init', 'create_building_tax' );
function create_building_tax() {
	register_taxonomy(
		'building-type',
		'building',
		array(
			'label' => __( 'Building Category' ),
			'rewrite' => array( 'slug' => 'building-type' ),
			'hierarchical'               => true,
			'public'                     => true,
			'show_ui'                    => true,
			'show_admin_column'          => true,
			'show_in_nav_menus'          => true,
			'show_tagcloud'              => true,
		)
	);
}
include_once('customie_column.php');
new Tax_CTP_Filter(array('building' => array('building-type')));
?>